import http from '@/utils/http'

/**
 * 根据商品id来获取详情数据
 * @param {string} id 
 */
export const getGoodsById = (id) => {
    return http({ url: `/goods`, data: { id } });
};

/**
 * 根据商品id获取同类推荐商品
 * @param {object} data 
 */
export const getGoodsRelevant = (data) => {
    return http({ url: `/goods/relevant`, data });
};